important time
def buble(a):
    ended = True
    while ended:
        ended = False
        for i in range(1, len(a)):
            if a[i] < a[i - 1]:
                a[i], a[i - 1] = a[i - 1], a[i]
                ended = True

with open('m3_shuffle.txt') as f:
    m3 = list(map(int, f.readlines()))
    t1 = time.time()
    buble(m3)
    t2 = time.time()
    print(t2 - t1)
    print('m3_shuffle.txt)

with open('m2_reverse.txt') as f:
    m3 = list(map(int, f.readlines()))
    t1 = time.time()
    buble(m3)
    t2 = time.time()
    print(t2 - t1)
    print('m2_reverse.txt)

with open('m1_sorted.txt') as f:
    m3 = list(map(int, f.readlines()))
    t1 = time.time()
    buble(m3)
    t2 = time.time()
    print(t2 - t1)
    print('m1_sorted.txt)
